package com.hy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hy.entity.User;
import com.hy.entity.vo.GenderStatisticsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper extends BaseMapper<User> {

//    @Update("UPDATE users SET points = points - #{points} WHERE id = #{userId} AND points >= #{points}")
    int reducePoints(@Param("userId") Long userId, @Param("points") Integer points);
    GenderStatisticsVO getGenderStatistics();
}
